﻿<%@ Page Language="C#" MasterPageFile="~/Manager.master" AutoEventWireup="true" CodeFile="Inventory.aspx.cs"
    Inherits="Manager_ProductStore_Inventory" Title="Untitled Page" %>

<%@ Register Src="../../Pub/Module/Calendar.ascx" TagName="Calendar" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table border="0" cellpadding="2" cellspacing="0" width="100%">
        <tr>
            <td>
                  <table border="1" bordercolor="#407db3" cellpadding="2" cellspacing="2" class="tbl_Comon-Search"
            style="border-collapse: collapse" width="100%">
                    <tr>
                        <td align="center">
                            <asp:Button ID="Button1" runat="server" Text="Tìm kiếm" CssClass="cssButton" /></td>
                        <td class="td_Title">
                            &nbsp;<asp:Label ID="Label3" runat="server" Text="Ngày:"></asp:Label></td>
                        <td>
                            <uc1:Calendar ID="Calendar1" runat="server" />
                            ~<uc1:Calendar ID="Calendar2" runat="server" />
                        </td>
                        <td class="td_Title">
                            &nbsp;<asp:Label ID="Label2" runat="server" Text="Kho:"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlStore" runat="server">
                            </asp:DropDownList></td>
                    </tr>
                </table>
            
            </td>
        </tr>
        <tr>
            <td>
                <asp:DataList ID="dtlMaster" runat="server" Width="100%" OnItemDataBound="dtlMaster_ItemDataBound">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text="Kho hàng: "></asp:Label>
                        <asp:Label ID="lblStoreName" runat="server" Text='<%# Eval("StName") %>'></asp:Label><br />
                        <asp:GridView ID="grvMaster" runat="server" AutoGenerateColumns="False" BorderColor="#407db3"
                            BorderWidth="1px" CellPadding="2" PageSize="20" Width="100%">
                            <Columns>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        STT
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <%#Container.DisplayIndex + 1%>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="1%" Wrap="False" />
                                    <HeaderStyle CssClass="cssBorderGrv" Wrap="False" />
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        Tên Hàng</HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblPDName" runat="server"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="cssBorderGrv" Wrap="False" HorizontalAlign="Center" />
                                    <HeaderStyle CssClass="cssBorderGrv" Width="30%" />
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        Loại hàng</HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblCatalogue" runat="server"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="cssBorderGrv" Wrap="False" HorizontalAlign="Center" />
                                    <HeaderStyle CssClass="cssBorderGrv" Wrap="false" />
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        Ngày</HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblDate" runat="server"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="cssBorderGrv" Wrap="False" HorizontalAlign="Center" />
                                    <HeaderStyle CssClass="cssBorderGrv" Width="10%" />
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        Số lượng</HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblQuantity" runat="server" Style="text-align: right" CssClass="lblCalcTotal"
                                            onkeyup="fnDisplayTextMoneyPrice(this)"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="cssBorderGrv" Wrap="False" HorizontalAlign="Center" />
                                    <HeaderStyle CssClass="cssBorderGrv" Wrap="false" />
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        Đơn giá</HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblPrice" runat="server" Style="text-align: right" Text="0" CssClass="lblCalcTotal"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="cssBorderGrv" Wrap="False" HorizontalAlign="Center" />
                                    <HeaderStyle CssClass="cssBorderGrv" Width="10%" />
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        Thành tiền (VNĐ)
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblTotal" runat="server" Style="text-align: right" Text="0" CssClass="lblTotal"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="cssBorderGrv" HorizontalAlign="Center" Width="25%" />
                                    <HeaderStyle CssClass="cssBorderGrv" Wrap="false" />
                                </asp:TemplateField>
                            </Columns>
                            <RowStyle CssClass="gvRowStyle" Height="10px" />
                            <HeaderStyle CssClass="cssHeader" Height="20px" HorizontalAlign="Center" Wrap="False" />
                            <AlternatingRowStyle CssClass="gvgRowStyle" Height="10px" />
                        </asp:GridView>
                    </ItemTemplate>
                </asp:DataList>&nbsp;
            </td>
        </tr>
        <tr>
            <td style="background-color: whiteSmoke; height: 20px; text-align: center; vertical-align: middle">
                <input type="button" class="cssButton" value="Bảo lưu" style="width: 80px" id="btnSave" />
            </td>
        </tr>
    </table>
    <input type="hidden" id="hidXML" runat="server" />

    <script language="javascript" type="text/javascript">
    function fnDistributionCompany(DisCompID)
    {
              if(DisCompID!="" && DisCompID!="0")
              {
                  $(document).ready(function() 
                    {
                        $strXML="<PccMsg>";
                        $strXML+="<Method>LOADDISTRIBUTIONCOMPANY</Method>";  
                        $strXML+="<DisCompID>"+DisCompID+"</DisCompID>";                                         
                        $strXML+="</PccMsg>";                                    
                        $("#<%= hidXML.ClientID %>").val($strXML);
                        document.getElementById("aspnetForm").submit();     
                      });  
              }
    }
    
     function OpenDistributionCompany()
    {
         window.open("../DistributionCompany/ChooseDistributionCompany.aspx");
    }    
    </script>

</asp:Content>
